package response

import (
	"mts/trans_srv/internal/domain"
)

type LanguageResponse struct {
	LangId string `json:"lang_id"`
	Name   string `json:"name"`
	Dsc    string `json:"dsc"`
	Enable bool   `json:"enable"`
}

type LanguageListResponse struct {
	LanguageResponse []LanguageResponse `json:"data"`
}

// NewLanguageResponse 将 domain.Language 转换为 response.LanguageResponse
func NewLanguageResponse(language *domain.Language) *LanguageResponse {
	return &LanguageResponse{
		LangId: language.LangID,
		Name:   language.Name,
		Dsc:    language.Dsc,
		Enable: language.Enabled,
	}
}
